package com.dd.controller;

import com.dd.entity.PurchaseOrderDetails;
import com.dd.entity.R;
import com.dd.service.IPurchaseOrderDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 采购明细表 记录每个采购订单的具体商品信息。 前端控制器
 * </p>
 *
 * @author dhd
 * @since 2024-10-21
 */
@RestController
@RequestMapping("/purchaseOrderDetails")
public class PurchaseOrderDetailsController {

    @Autowired
    IPurchaseOrderDetailsService purchaseOrderDetailsService;

    @GetMapping("/queryAllByOrderIdAndSupplierId")
    public R queryAllByOrderIdAndSupplierId(@RequestParam String orderId, @RequestParam Integer supplierId) {
        return R.success(purchaseOrderDetailsService.selectAllByOrderIdAndSupplierId(orderId,supplierId));
    }

}
